home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / systems / atari / birkhahn-metafont-packed-disks / mf27-2_2e-disk2.zoo / inputs / pandora.lzs / FLIGS.MF < prev    next >
Text File  |  1991-08-15  |  10KB  |  231 lines

  1. %*****************************************************************************
  2. %        Copyright (c) 1989 by N. N. Billawala
  3. %*****************************************************************************
  4.  
  5.  
  6. % fligs.mf  ligatures with the "f" character
  7.  
  8. % 5 characters; iff OK "f": for testing
  9.  
  10. % Only the ff,fi,fl ligatures have a fixed pitch ligature.
  11. % The reason being that combining two stems might look reasonable; but
  12. % combining three stems would generally create the undesirable type of 
  13. % darkness found in the lowercase m
  14.  
  15.  
  16. iff OK "f":  "The ff ligature";  
  17.   beginchar(11,(n_w+r_w-stem.lc#/(width#+mono#))*width#+b_mono#,ascender#,0); 
  18.  
  19.   if mono=0: bot lft z4l=(round (.2r_w*width),0);  
  20.              bot lft z14l=(round (x4l+n_w*width-stem.lc),0);  
  21.     else: bot lft z4l=(0,0); bot rt z14r=(w,0);    fi
  22.   top z1l=(x4l,h)//;           multpos(1,4,11,14)(stem.lc,0); 
  23.   top z11l=(x14l,h)//;
  24.   onaline(1l,4l)(2l,3l);       y2l=max(xheight,.75xheight+(r_arch*(h-xheight)));
  25.   onaline(1r,4r)(2r,3r,22r);   y2r=max(xheight,.75xheight+(l_arch*(h-xheight)));
  26.   onaline(11l,14l)(12l,13l);   y12l=y2l; y12r=y2r;
  27.   onaline(11r,14r)(12r,13r);   y3l=y3r=y13l=y13r=x_bracket_h;
  28.   rt z16=(if mono<>0:w+abs(x14l-x4r)else:max(w,x14r+.95abs(x14l-x4r))fi,.99h)//;
  29.   rt z6=(x14l,y5r-y15r+y16)//;
  30.   save_num(knob)=min(bulb_thickness,.6(x16-x14r));    
  31.   top y15r=bot y15l+minor_curve.lc=round(.5[h+ov_t.lc,maxheight]); 
  32.   top y5r=inlimit(.9[xheight,h+ov_t.lc])(xheight+2minor_curve.lc,h+ov_t.lc);
  33.   bot y5l+minor_curve.lc=top y5r;
  34.   good_x_for(5r)(z3l,z6,.5)a;  
  35.   good_x_for(5l)(z3r,z6-(bulb_thickness,0),.5)b;
  36.   good_x_for(15r)(z13l,z16,.6)c;
  37.   good_x_for(15l)(z13r,z16-(knob,0),.6)d;
  38.  
  39.   top rt z21=(w if mono<>0:+max(1,.75stem.lc)fi,xheight)//;
  40.   y22r=y21;                    multpos(22,23)(max(1,.8thin_stem.lc),90);        
  41.   lft z23r=(0 if mono<>0:-max(1,.75stem.lc)fi,y21)//; 
  42.  
  43.   p1=fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z2r{upward} i_t
  44.      bulb.tr(z6,z5l,z5r,.75cs,bulb_thickness,90) o_t z2l{downward}--cycle;
  45.   p2=fullserif(z14,z11,z13l,z13r,.5hs,.75hs)--z12r{upward} i_t
  46.      bulb.tr(z16,z15l,z15r,.75cs,knob,90) o_t z12l{downward}--cycle;
  47.  
  48.   min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness));
  49.   p3=(arm.tr(z21,z22l,z22r,.15as,.25tip_thickness,90)
  50.       soften(z23r,z23l) z22l)--cycle;
  51.  
  52.   showpoints(1,2,3,4,5,6,11,12,13,14,15,16,21,22,23);
  53. adjust(v_a*fitbasis.lc#-.25r_w*width#+m_a*b_mfit#,0*fitbasis.lc#+m_a*b_mfit#);
  54. show_character; endchar;
  55.  
  56. % This character is based on 2 "f"; the width is determined by the "n" width
  57. % plus the width of the single "f" minus one stem. The crossbar has been
  58. % extended. The right "f" should be like the single one; the top of the
  59. % left "f" extended to overlap the right one.
  60. % Placement of the curved arm on first "f" slightly altered
  61.  
  62.  
  63.  
  64. iff OK "f":  "The fi ligature";  
  65.   beginchar(12,(n_w+.2r_w)*width#+b_mono#,ascender#,0); 
  66.  
  67.   bot lft z4l=(round (.2r_w*width),0);  multpos(1,4,11,14)(stem.lc,0);
  68.   bot rt z14r=(w,0);
  69.   top z1l=(x4l,h)//;
  70.   top z11l=(x14l,xheight)//;
  71.   onaline(1l,4l)(2l,3l);       y2l=max(xheight,.75xheight+(r_arch*(h-xheight)));
  72.   onaline(1r,4r)(2r,3r);       y2r=max(xheight,.75xheight+(l_arch*(h-xheight)));
  73.   onaline(11l,14l)(13l);   
  74.   onaline(11r,14r)(13r);       y3l=y3r=y13l=y13r=x_bracket_h;
  75.   rt z6=(x14l,.5[y5r,y5l])//;        
  76.   top y5r=bot y5l+minor_curve.lc=h+ov_t.lc; 
  77.   good_x_for(5r)(z3l,z6,.5)a;  
  78.   good_x_for(5l)(z3r,z6-(bulb_thickness,0),.5)b;
  79.   bot z21l=(0 if mono<>0:-max(1,.75stem.lc)fi,top y11l-max(1,.8thin_stem.lc))//;
  80.   z22r=z11l; 
  81.   multpos(21,22)(max(1,.8thin_stem.lc),90);
  82.  
  83.   min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness));
  84.   p1=fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z2r{upward} i_t
  85.      bulb.tr(z6,z5l,z5r,.75cs,bulb_thickness,90) o_t z2l{downward}--cycle;
  86.   p2=(fullserif(z14,z11,z13l,z13r,.5hs,.75hs) soften(z11r,z21r,z21l,z22l) 
  87.      z13l)--cycle;
  88.  
  89.   showpoints(1,2,3,4,5,6,11,13,14,21,22);
  90. adjust(v_a*fitbasis.lc#-.25r_w*width#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#);
  91. show_character; endchar;
  92.  
  93. % This character is based on the "f" and "i"; the width is determined 
  94. % by the "n" width plus the width of the left part of the "f" arm.
  95. % Placement of the curved arm on the "f" slightly altered
  96.  
  97.  
  98.  
  99. iff OK "f":  "The fl ligature";  
  100.   beginchar(13,(n_w+.2r_w)*width#+b_mono#,ascender#,0); 
  101.  
  102.   bot lft z4l=(round (.2r_w*width),0);  multpos(1,4,11,14)(stem.lc,0); 
  103.   bot rt z14r=(w,0);
  104.   top z1l=(x4l,h)//;
  105.   top z11r=(x14r,.98h)//;
  106.   onaline(1l,4l)(2l,3l);       y2l=max(xheight,.75xheight+(r_arch*(h-xheight)));
  107.   onaline(1r,4r)(2r,3r);       y2r=max(xheight,.75xheight+(l_arch*(h-xheight)));
  108.   onaline(11l,14l)(13l);   
  109.   onaline(11r,14r)(13r);       y3l=y3r=y13l=y13r=x_bracket_h;
  110.   top y5r=bot y5l+minor_curve.lc=h+ov_t.lc;
  111.   good_x_for(5r)(z3l,z11r,.5)a;
  112.   good_x_for(5l)(z3r,z11r-(bulb_thickness,0),.5)b;
  113.  
  114.   top rt z21r=(x14,xheight)//; multpos(21,22)(max(1,.8thin_stem.lc),90);
  115.   lft z22r=(0 if mono<>0:-max(1,.75stem.lc)fi,y21r)//; 
  116.   z23=.5[z21r,z22r];
  117.  
  118.   min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness));
  119.   p1=fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z2r{upward} i_t
  120.      bulb.tr(z11r,z5l,z5r,.75cs,bulb_thickness,90)soft o_t z2l{downward}--cycle;
  121.   p2=fullserif(z14,z11,z13l,z13r,.5hs,.75hs)--z11r--z11l--cycle;
  122.   p3=(z23 soften(z21r,z21l,z22l,z22r) z23)--cycle;
  123.  
  124.   showpoints(1,2,3,4,5,6,11,13,14,21,22,23);
  125. adjust(v_a*fitbasis.lc#-.25r_w*width#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#);
  126. show_character; endchar;
  127.  
  128. % This character is based on the "f" and "l"; the width is determined 
  129. % by the "n" width plus the width of the left part of the "f" arm.
  130. % Placement of the curved arm on the "f" slightly altered
  131.  
  132.  
  133. if mono=0:  % skips these characters if monopitch
  134.  
  135. iff OK "f":  "The ffi ligature";  
  136.   beginchar(14,(2n_w+.2r_w-stem.lc#/(width#+mono#))*width#,ascender#,0);
  137.  
  138.   bot lft z4l=(round (.2r_w*width),0);  multpos(1,4,11,14,21,24)(stem.lc,0); 
  139.   bot lft z14l=(round (x4l+n_w*width-stem.lc),0);
  140.   bot lft z24l=(round (x14l+n_w*width-stem.lc),0);         
  141.   top z1l=(x4l,h)//;
  142.   top z11l=(x14l,h)//;
  143.   top z21l=(x24l,xheight)//;
  144.   onaline(1l,4l)(2l,3l);       y2l=max(xheight,.75xheight+(r_arch*(h-xheight)));
  145.   onaline(1r,4r)(2r,3r);       y2r=max(xheight,.75xheight+(l_arch*(h-xheight)));
  146.   onaline(11l,14l)(12l,13l);   y12l=y2l; y12r=y2r;
  147.   onaline(11r,14r)(12r,13r);   y3l=y3r=y13l=y13r=y23l=y23r=x_bracket_h;
  148.   onaline(21l,24l)(23l); 
  149.   onaline(21r,24r)(23r);
  150.   rt z16=(x24l,.99h)//;         
  151.   rt z6=(x14l,y5r-y15r+y16)//;       
  152.   top y15r=bot y15l+minor_curve.lc=round(.5[h+ov_t.lc,maxheight]); 
  153.   top y5r=inlimit(.9[xheight,h+ov_t.lc])(xheight+2minor_curve.lc,h+ov_t.lc);
  154.   bot y5l+minor_curve.lc=top y5r;
  155.   good_x_for(5r)(z3l,z6,.5)a;  
  156.   good_x_for(5l)(z3r,z6-(bulb_thickness,0),.5)b;
  157.   good_x_for(15r)(z13l,z16,.5)c;
  158.   good_x_for(15l)(z13r,z16-(bulb_thickness,0),.5)d;
  159.   bot z31l=(0,top y21l-max(1,.8thin_stem.lc))//;
  160.   z32r=z21l; 
  161.   multpos(31,32)(max(1,.8thin_stem.lc),90);
  162.  
  163.   min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness));
  164.   p1=fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z2r{upward} i_t
  165.      bulb.tr(z6,z5l,z5r,.75cs,bulb_thickness,90) o_t z2l{downward}--cycle;
  166.   p2=fullserif(z14,z11,z13l,z13r,.5hs,.5hs)--z12r{upward} i_t
  167.      bulb.tr(z16,z15l,z15r,.75cs,bulb_thickness,90) o_t z12l{downward}--cycle;
  168.   p3=(fullserif(z24,z21,z23l,z23r,.5hs,.75hs) soften(z21r,z31r,z31l,z32l) 
  169.      z23l)--cycle;
  170.  
  171.   showpoints(1,2,3,4,5,6,11,12,13,14,15,16,21,23,24,31,32);
  172. adjust(v_a*fitbasis.lc#-.25r_w*width#,v_a*fitbasis.lc#);
  173. show_character; endchar;
  174.  
  175. % This character is based on 2 "f" and an "i"; the width is 
  176. % determined by 2 "n" widths plus the width of the single "f" minus two stems. 
  177. % It's a combination of the "ff" and "fi" ligatures
  178. % Placement of the curved arm on first and second "f" slightly altered
  179. % No setting for fixed pitch
  180.  
  181.  
  182. iff OK "f":  "The ffl ligature";  
  183.   beginchar(15,(2n_w+.2r_w-stem.lc#/(width#+mono#))*width#,ascender#,0);
  184.  
  185.   bot lft z4l=(round (.2r_w*width),0);  multpos(1,4,11,14,21,24)(stem.lc,0);
  186.   bot lft z14l=(round (x4l+n_w*width-stem.lc),0); 
  187.   bot lft z24l=(round (x14l+n_w*width-stem.lc),0);
  188.   top z1l=(x4l,h)//;
  189.   top z11l=(x14l,h)//;
  190.   top z21l=(x24l,.98h)//;
  191.   onaline(1l,4l)(2l,3l);       y2l=max(xheight,.75xheight+(r_arch*(h-xheight)));
  192.   onaline(1r,4r)(2r,3r);       y2r=max(xheight,.75xheight+(l_arch*(h-xheight)));
  193.   onaline(11l,14l)(12l,13l);   y12l=y2l; y12r=y2r;
  194.   onaline(11r,14r)(12r,13r);   y3l=y3r=y13l=y13r=y23l=y23r=x_bracket_h;
  195.   onaline(21l,24l)(23l); 
  196.   onaline(21r,24r)(23r);
  197.   rt z16=(x24,.99h)//;   
  198.   rt z6=(x14l,y5r-y15r+y16)//;                  
  199.   top y15r=bot y15l+minor_curve.lc=round(.5[h+ov_t.lc,maxheight]); 
  200.   top y5r=inlimit(.9[xheight,h+ov_t.lc])(xheight+2minor_curve.lc,h+ov_t.lc);
  201.   bot y5l+minor_curve.lc=top y5r;
  202.   good_x_for(5r)(z3l,z6,.5)a;  
  203.   good_x_for(5l)(z3r,z6-(bulb_thickness,0),.5)b;
  204.   good_x_for(15r)(z13l,z16,.5)c;
  205.   good_x_for(15l)(z13r,z16-(bulb_thickness,0),.5)d;
  206.  
  207.   top rt z31r=(x24,xheight)//;  multpos(31,32)(max(1,.8thin_stem.lc),90);
  208.   lft z32r=(0,y31r)//; 
  209.   z33=.5[z31r,z32r];
  210.  
  211.   min_limit(join_radius)(.5*min(.8thin_stem.lc,serif_thickness));
  212.   p1=fullserif(z4,z1,z3l,z3r,.5hs,.5hs)--z2r{upward} i_t
  213.      bulb.tr(z6,z5l,z5r,.75cs,bulb_thickness,90) o_t z2l{downward}--cycle;
  214.   p2=fullserif(z14,z11,z13l,z13r,.5hs,.5hs)--z12r{upward} i_t
  215.      bulb.tr(z21r,z15l,z15r,.75cs,bulb_thickness,90)soft o_t z12l{downward}--
  216.      cycle;
  217.   p3=fullserif(z24,z21,z23l,z23r,.5hs,.75hs)--z21r--z21l--cycle;
  218.   p4=(z33 soften(z31r,z31l,z32l,z32r) z33)--cycle;
  219.  
  220.   showpoints(1,2,3,4,5,6,11,12,13,14,15,16,21,22,23,24,31,32,33);
  221. adjust(v_a*fitbasis.lc#-.25r_w*width#,v_a*fitbasis.lc#);
  222. show_character; endchar;
  223.  
  224. % This character is based on 2 "f" and an "l"; the width is 
  225. % determined by 2 "n" widths plus the width of the single "f" minus two stems. 
  226. % It's a combination of the "ff" and "fl" ligatures
  227. % Placement of the curved arm on first and second "f" slightly altered
  228. % No setting for fixed pitch
  229.  
  230. fi %*****closing for case if monopitch
  231.